package com.lyt.dao;

import com.lyt.bean.PublishPaper;
import com.lyt.bean.Question;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import javax.validation.constraints.Null;
import java.util.List;

/**
 * @Author: lyt
 * @Date: 2023/05/21/18:25
 * @Description:
 */
public interface TestExamDao {

    //获取paper
    @Select("select * from publish_paper where course_id=#{id} and grade =#{grade1} and marked=0")
    public List<PublishPaper> getTestPapers(int id,int grade1);//根据

    //获取考试时间
    //获取paper
    @Select("select test_time from publish_paper where paper_id=#{paperId}")
    public int getTestTime(int paperId);//根据


    //获取paper
    @Null
    @Select("select marked from publish_paper where paper_id=#{paperId} and course_id= #{courseId} and grade = #{gradeId}")
    public Integer isMarked(PublishPaper publishPaper);//根据

    //获取试卷的班级

    @Insert("insert into publish_paper(paper_id,course_id,test_time,grade,marked) value(#{paperId},#{courseId},#{testTime},#{gradeId},#{marked})" )
    public int InsertPublishPaper(PublishPaper publishPaper);//创建试题


}
